<template>
  <div>
    购物车
      <h1>state:{{tStore.token}}</h1>
     <h1>getters:{{tStore.tokens}}</h1>
     <button @click="run"> 触发pinia的acitons</button>
     <hr>
     <h1>state:{{pStore.phone}}</h1>
     <h1>getters:{{pStore.phoneStr}}</h1>
      <button @click="say"> 触发pinia的acitons</button>
  </div>
</template>
<script setup>
import {tokenStore} from '../../pstore/index'
import {phoneStore} from '../../pstore/cart'
let tStore=tokenStore();
let pStore=phoneStore();
console.log(tStore.token)
let run=()=>{
  // 触发pinia的actions
  tStore.setToken("adshf888888888888888")
}

let say=()=>{
  pStore.changePhone(1766669999)
}
</script>